package javaapplication1;

import java.io.FileNotFoundException;
import java.util.Scanner;

public class JavaApplication1 {
    private static String fileName;

    public static void main(String[] args) throws FileNotFoundException {
        fileName = "/Users/alexey/Documents/lol1";
        IO lol = new IO();
        System.out.println("createFile:");
        IO.createFile(fileName);
        System.out.println(IO.readFromFile(fileName));
        System.out.println("\nwriteFile (isAppend = false)):");
        IO.writeToFile(fileName, "WANNASOMETEXT??!", false);
        System.out.println(IO.readFromFile(fileName));
        System.out.println("\nwriteFile (isAppend = true)):");
        IO.writeToFile(fileName, "WANNASOMETEXTAGAIN??!", true);
        System.out.println(IO.readFromFile(fileName));
        System.out.println("\nwriteFile (isAppend = false)):");
        IO.writeToFile(fileName, "NOWUGOTTAGETSOMEORIGINALTEXT!!!", false);
        System.out.println(IO.readFromFile(fileName));
        IO.compressFile(fileName);
        IO.deleteFile(fileName);
        
    }
    
}
